System and method for performing a real-time wall detection

ABSTRACT

Provided are embodiments for a system and method for performing real-time detection for mapping. The embodiments include one or more processors, a scanner, and a mobile computing device removably coupled to the 2D scanner where the mobile computing device having a display. Embodiments include collecting scan data of an environment to generate a first map and identifying lines from the collected scan data corresponding to a surface of a structure. Embodiments also include grouping the identified lines into buckets based at least in part on a characteristic of the identified lines and combining the identified lines in each bucket. Embodiments also include optimizing the first map to generate a second map and displaying the second map on the display.

BACKGROUND

The present application is directed to a system that optically scans an environment, such as a building, and in particular to a portable system that generates two-dimensional floorplans of the scanned environment.

The automated creation of digital two-dimensional floorplans for existing structures is desirable as it allows the size and shape of the environment to be used in many processes. For example, a floorplan may be desirable to allow construction drawings to be prepared during a renovation. Such floorplans may find other uses such as in documenting a building for a fire department or to document a crime scene.

Existing measurement systems typically use a scanning device that determines coordinates of surfaces in the environment by both emitting a light and capturing a reflection to determine a distance or by triangulation using cameras. These scanning devices are mounted to a movable structure, such as a cart, and moved through the building to generate a digital representation of the building. These systems tend to be more complex and require specialized personnel to perform the scan. Further, the scanning equipment including the movable structure may be bulky, which could further delay the scanning process in time-sensitive situations, such as a crime or accident scene investigation.

Accordingly, while existing scanners are suitable for their intended purposes, what is needed is a system for having certain features of embodiments of the present invention.

BRIEF DESCRIPTION

According to one aspect of the invention, a system for performing real-time wall detection for mapping is provided. The system includes one or more processors, a scanner, and a mobile computing device removably coupled to the 2D scanner, the mobile computing device having a display. The one or more processors are responsive to executable instructions which when executed by the one or more processors to collect scan data of an environment to generate a first map; identify lines from the collected scan data corresponding to a surface of a structure; group the identified lines into buckets based at least in part on a characteristic of the identified lines; combine the identified lines in each bucket; optimize the first map to generate a second map; and display the second map on the display.

According to another aspect of the invention, a method for performing real-time wall detection for mapping is provided. The method includes providing a scanner device configured to scan an environment to collect scan data to form a first map; identifying lines, by one or more processors, from the collected scan data corresponding to a surface of a structure; grouping the identified lines into buckets based at least in part on a characteristic; combining the identified lines in each bucket; optimizing the first map to generate a second map; and displaying, on a display device, the second map.

According to another aspect of the invention, a scanning device for performing real-time wall detection for mapping is provided. The scanning device includes one or more processors, wherein the one or more processor are responsive to executable instructions which when executed by the one or more processors to collect scan data of an environment to generate a first map; identify lines from the collected scan data corresponding to a surface of a structure; group the identified lines into buckets based at least in part on a characteristic of the identified lines, wherein the characteristic is an orientation of the identified lines that is based at least in part on an angle in reference to a reference frame of the environment; combine the identified lines in each bucket; optimize the first map to generate a second map; and display the second map on the display.

These and other advantages and features will become more apparent from the following description taken in conjunction with the drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

The subject matter, which is regarded as the invention, is particularly pointed out and distinctly claimed in the claims at the conclusion of the specification. The foregoing and other features, and advantages of the invention are apparent from the following detailed description taken in conjunction with the accompanying drawings in which:

FIGS. 1-3 are perspective views of a scanning and mapping system in accordance with an embodiment;

FIG. 4 is a first end view of the system of FIG. 1;

FIG. 5 is a side sectional view of the system of FIG. 1;

FIG. 6 is a side sectional view of the system of a scanning and mapping system in accordance with another embodiment;

FIG. 7 is a first end view of the system of FIG. 6;

FIG. 8 is a top sectional view of the system of FIG. 6;

FIG. 9 is an enlarged view of a portion of the second end of FIG. 7;

FIG. 10 is a block diagram of the system of FIG. 1 and FIG. 6;

FIG. 11-13 are schematic illustrations of the operation of the system of FIG. 9 in accordance with an embodiment;

FIG. 14 is a flow diagram of a method of generating a two-dimensional map of an environment;

FIGS. 15-16 are plan views of stages of a two-dimensional map generated with the method of FIG. 14 in accordance with an embodiment;

FIG. 17-18 are schematic views of the operation of the system of FIG. 9 in accordance with an embodiment;

FIG. 19 is a flow diagram of a method of generating a two-dimensional map using the system of FIG. 9 in accordance with an embodiment;

FIG. 20 is a map an environment that is obtained in accordance with an embodiment;

FIGS. 21A-21D are schematic views of an operation in accordance with one an embodiment;

FIGS. 22A and 22B are schematic views of an optimization process performed in accordance with an embodiment;

FIG. 23 illustrates an updated 2D map according to an embodiment of the invention;

FIG. 24 is a flow diagram of a method for generating a 2D map in accordance with one or more embodiments; and

FIG. 25 is a flow diagram of a method for optimizing 2D map data in accordance with one or more embodiments.

The detailed description explains embodiments of the invention, together with advantages and features, by way of example with reference to the drawings.

DETAILED DESCRIPTION

The present invention relates to a device that includes a system having a 2D scanner that works cooperatively with one or more processors and/or processing modules to generate a two-dimensional (2D) map of an environment in real-time. Turning now to an overview of technologies that are more specifically relevant to aspects of the invention, existing scanning and measurement systems typically use a scanning device that house limited mobility and processing capability. Although these scanning devices can be mounted to a movable structure, these scanning devices may not be able to access certain areas due to an obstacle being in its path or additional manually labor may be required to produce a clear path for the movable structure to perform the scan. In addition, the conventional scanners and scanning systems are configured to obtain scan data of an environment where real-time processing and optimization of the data is unavailable. These scanning devices perform post-processing of the previously collected scan data in order to generate the mapping information of the environment. In other words, the scanners are unable to perform real-time processing and production of the 2D map as the environment is currently scanned by the scanning device. Thus, a technique is desired for producing a noise-free map of the environment in real-time using a portable scanning device and system.

Turning now to an overview of the aspects of the invention, one or more embodiments provide collecting the scan data generating a refined map image. The described methods employ an optimization operation to remove portions of scan data that correspond to intersecting lines that add distortion to the final image. Methods for performing the real-time wall detection for mapping devices are discussed with reference to figures and description below.

Turning now to a more detailed description of aspects of the present invention, FIGS. 1-5 depict an embodiment of a system 30 having a housing 32 that includes a body portion 34 and a handle portion 36. In an embodiment, the handle 36 may include an actuator 38 that allows the operator to interact with the system 30. In the exemplary embodiment, the body 34 includes a generally rectangular center portion 35 with a slot 40 formed in an end 42. The slot 40 is at least partially defined by a pair of walls 44 that are angled towards a second end 48. As will be discussed in more detail herein, a portion of a two-dimensional scanner 50 is arranged between the walls 44. The walls 44 are angled to allow the scanner 50 to operate by emitting a light over a large angular area without interference from the walls 44. As will be discussed in more detail herein, the end 42 may further include a three-dimensional camera or RGBD camera 60.

Extending from the center portion 35 is a mobile device holder 41. The mobile device holder 41 is configured to securely couple a mobile device 43 to the housing 32. The holder 41 may include one or more fastening elements, such as a magnetic or mechanical latching element for example, that couples the mobile device 43 to the housing 32. In an embodiment, the mobile device 43 is coupled to communicate with a controller 68 (FIG. 10). The communication between the controller 68 and the mobile device 43 may be via any suitable communications medium, such as wired, wireless or optical communication mediums for example.

In the illustrated embodiment, the holder 41 is pivotally coupled to the housing 32, such that it may be selectively rotated into a closed position within a recess 46. In an embodiment, the recess 46 is sized and shaped to receive the holder 41 with the mobile device 43 disposed therein.

In the exemplary embodiment, the second end 48 includes a plurality of exhaust vent openings 56. In an embodiment, shown in FIGS. 6-9, the exhaust vent openings 56 are fluidly coupled to intake vent openings 58 arranged on a bottom surface 62 of center portion 35. The intake vent openings 58 allow external air to enter a conduit 64 having an opposite opening 66 (FIG. 6) in fluid communication with the hollow interior 67 of the body 34. In an embodiment, the opening 66 is arranged adjacent to a controller 68 which has one or more processors that is operable to perform the methods described herein. In an embodiment, the external air flows from the opening 66 over or around the controller 68 and out the exhaust vent openings 56.

The controller 68 is coupled to a wall 70 of body 34. In an embodiment, the wall 70 is coupled to or integral with the handle 36. The controller 68 is electrically coupled to the 2D scanner 50, the 3D camera 60, a power source 72, an inertial measurement unit (IMU) 74, a laser line projector 76, and a haptic feedback device 77.

Referring now to FIG. 10 with continuing reference to FIGS. 1-9, elements are shown of the system 30 with the mobile device 43 installed or coupled to the housing 32. Controller 68 is a suitable electronic device capable of accepting data and instructions, executing the instructions to process the data, and presenting the results. The controller 68 includes one or more processing elements 78. The processors may be microprocessors, field programmable gate arrays (FPGAs), digital signal processors (DSPs), and generally any device capable of performing computing functions. The one or more processors 78 have access to memory 80 for storing information.

Controller 68 is capable of converting the analog voltage or current level provided by 2D scanner 50, camera 60 and IMU 74 into a digital signal to determine a distance from the system 30 to an object in the environment. In an embodiment, the camera 60 is a 3D or RGBD type camera. Controller 68 uses the digital signals that act as input to various processes for controlling the system 30. The digital signals represent one or more system 30 data including but not limited to distance to an object, images of the environment, acceleration, pitch orientation, yaw orientation and roll orientation. As will be discussed in more detail, the digital signals may be from components internal to the housing 32 or from sensors and devices located in the mobile device 43.

In general, when the mobile device 43 is not installed, controller 68 accepts data from 2D scanner 50 and IMU 74 and is given certain instructions for the purpose of generating a two-dimensional map of a scanned environment. Controller 68 provides operating signals to the 2D scanner 50, the camera 60, laser line projector 76 and haptic feedback device 77. Controller 68 also accepts data from IMU 74, indicating, for example, whether the operator is operating in the system in the desired orientation. The controller 68 compares the operational parameters to predetermined variances (e.g. yaw, pitch or roll thresholds) and if the predetermined variance is exceeded, generates a signal that activates the haptic feedback device 77. The data received by the controller 68 may be displayed on a user interface coupled to controller 68. The user interface may be one or more LEDs (light-emitting diodes) 82, an LCD (liquid-crystal diode) display, a CRT (cathode ray tube) display, or the like. A keypad may also be coupled to the user interface for providing data input to controller 68. In one embodiment, the user interface is arranged or executed on the mobile device 43.

The controller 68 may also be coupled to external computer networks such as a local area network (LAN) and the Internet. A LAN interconnects one or more remote computers, which are configured to communicate with controller 68 using a well-known computer communications protocol such as TCP/IP (Transmission Control Protocol/Internet (A) Protocol), RS-232, ModBus, and the like. Additional systems 30 may also be connected to LAN with the controllers 68 in each of these systems 30 being configured to send and receive data to and from remote computers and other systems 30. The LAN may be connected to the Internet. This connection allows controller 68 to communicate with one or more remote computers connected to the Internet.

The processors 78 are coupled to memory 80. The memory 80 may include random access memory (RAM) device 84, a non-volatile memory (NVM) device 86, a read-only memory (ROM) device 88. In addition, the processors 78 may be connected to one or more input/output (I/O) controllers 90 and a communications circuit 92. In an embodiment, the communications circuit 92 provides an interface that allows wireless or wired communication with one or more external devices or networks, such as the LAN discussed above.

Controller 68 includes operation control methods embodied in application code shown or described with reference to FIGS. 11-14 and FIG. 19. These methods are embodied in computer instructions written to be executed by processors 78, typically in the form of software. The software can be encoded in any language, including, but not limited to, assembly language, VHDL (Verilog Hardware Description Language), VHSIC HDL (Very High Speed IC Hardware Description Language), Fortran (formula translation), C, C++, C#, Objective-C, Visual C++, Java, ALGOL (algorithmic language), BASIC (beginners all-purpose symbolic instruction code), visual BASIC, ActiveX, HTML (HyperText Markup Language), Python, Ruby and any combination or derivative of at least one of the foregoing.

Coupled to the controller 68 is the 2D scanner 50. The 2D scanner 50 measures 2D coordinates in a plane. In the exemplary embodiment, the scanning is performed by steering light within a plane to illuminate object points in the environment. The 2D scanner 50 collects the reflected (scattered) light from the object points to determine 2D coordinates of the object points in the 2D plane. In an embodiment, the 2D scanner 50 scans a spot of light over an angle while at the same time measuring an angle value and corresponding distance value to each of the illuminated object points.

Examples of 2D scanners 50 include but are not limited to Model LMS100 scanners manufactured by Sick, Inc of Minneapolis, Minn. and scanner Models URG-04LX-UG01 and UTM-30LX manufactured by Hokuyo Automatic Co., Ltd of Osaka, Japan. The scanners in the Sick LMS100 family measure angles over a 270 degree range and over distances up to 20 meters. The Hoyuko model URG-04LX-UG01 is a low-cost 2D scanner that measures angles over a 240 degree range and distances up to 4 meters. The Hoyuko model UTM-30LX is a 2D scanner that measures angles over a 270 degree range and to distances up to 30 meters. It should be appreciated that the above 2D scanners are exemplary and other types of 2D scanners are also available.

In an embodiment, the 2D scanner 50 is oriented so as to scan a beam of light over a range of angles in a generally horizontal plane (relative to the floor of the environment being scanned). At instants in time the 2D scanner 50 returns an angle reading and a corresponding distance reading to provide 2D coordinates of object points in the horizontal plane. In completing one scan over the full range of angles, the 2D scanner returns a collection of paired angle and distance readings. As the system 30 is moved from place to place, the 2D scanner 50 continues to return 2D coordinate values. These 2D coordinate values are used to locate the position of the system 30 thereby enabling the generation of a two-dimensional map or floorplan of the environment.

Also coupled to the controller 86 is the IMU 74. The IMU 74 is a position/orientation sensor that may include accelerometers 94 (inclinometers), gyroscopes 96, a magnetometers or compass 98, and altimeters. In the exemplary embodiment, the IMU 74 includes multiple accelerometers 94 and gyroscopes 96. The compass 98 indicates a heading based on changes in magnetic field direction relative to the earth's magnetic north. The IMU 74 may further have an altimeter that indicates altitude (height). An example of a widely used altimeter is a pressure sensor. By combining readings from a combination of position/orientation sensors with a fusion algorithm that may include a Kalman filter, relatively accurate position and orientation measurements can be obtained using relatively low-cost sensor devices. In the exemplary embodiment, the IMU 74 determines the pose or orientation of the system 30 about three-axis to allow a determination of a yaw, roll and pitch parameter.

In the embodiment shown in FIGS. 6-9, the system 30 further includes a camera 60 that is a 3D or RGB-D camera. As used herein, the term 3D camera refers to a device that produces a two-dimensional image that includes distances to a point in the environment from the location of system 30. The 3D camera 30 may be a range camera or a stereo camera. In an embodiment, the 3D camera 30 includes an RGB-D sensor that combines color information with a per-pixel depth information. In an embodiment, the 3D camera 30 may include an infrared laser projector 31 (FIG. 9), a left infrared camera 33, a right infrared camera 39, and a color camera 37. In an embodiment, the 3D camera 60 is a RealSense™ camera model R200 manufactured by Intel Corporation.

In an embodiment, when the mobile device 43 is coupled to the housing 32, the mobile device 43 becomes an integral part of the system 30. In an embodiment, the mobile device 43 is a cellular phone, a tablet computer or a personal digital assistant (PDA). The mobile device 43 may be coupled for communication via a wired connection, such as ports 100, 102. The port 100 is coupled for communication to the processor 78, such as via I/O controller 90 for example. The ports 100, 102 may be any suitable port, such as but not limited to USB, USB-A, USB-B, USB-C, IEEE 1394 (Firewire), or Lightning™ connectors.

The mobile device 43 is a suitable electronic device capable of accepting data and instructions, executing the instructions to process the data, and presenting the results. The mobile device 43 includes one or more processing elements 104. The processors may be microprocessors, field programmable gate arrays (FPGAs), digital signal processors (DSPs), and generally any device capable of performing computing functions. The one or more processors 104 have access to memory 106 for storing information.

The mobile device 43 is capable of converting the analog voltage or current level provided by sensors 108 and processor 78. Mobile device 43 uses the digital signals that act as input to various processes for controlling the system 30. The digital signals represent one or more system 30 data including but not limited to distance to an object, images of the environment, acceleration, pitch orientation, yaw orientation, roll orientation, global position, ambient light levels, and altitude for example.

In general, mobile device 43 accepts data from sensors 108 and is given certain instructions for the purpose of generating or assisting the processor 78 in the generation of a two-dimensional map or three-dimensional map of a scanned environment. Mobile device 43 provides operating signals to the processor 78, the sensors 108 and a display 110. Mobile device 43 also accepts data from sensors 108, indicating, for example, to track the position of the mobile device 43 in the environment or measure coordinates of points on surfaces in the environment. The mobile device 43 compares the operational parameters to predetermined variances (e.g. yaw, pitch or roll thresholds) and if the predetermined variance is exceeded, may generate a signal. The data received by the mobile device 43 may be displayed on display 110. In an embodiment, the display 110 is a touch screen device that allows the operator to input data or control the operation of the system 30.

The controller 68 may also be coupled to external networks such as a local area network (LAN), a cellular network and the Internet. A LAN interconnects one or more remote computers, which are configured to communicate with controller 68 using a well-known computer communications protocol such as TCP/IP (Transmission Control Protocol/Internet (A) Protocol), RS-232, ModBus, and the like. Additional systems 30 may also be connected to LAN with the controllers 68 in each of these systems 30 being configured to send and receive data to and from remote computers and other systems 30. The LAN may be connected to the Internet. This connection allows controller 68 to communicate with one or more remote computers connected to the Internet.

The processors 104 are coupled to memory 106. The memory 106 may include random access memory (RAM) device, a non-volatile memory (NVM) device, and a read-only memory (ROM) device. In addition, the processors 104 may be connected to one or more input/output (I/O) controllers 112 and a communications circuit 114. In an embodiment, the communications circuit 114 provides an interface that allows wireless or wired communication with one or more external devices or networks, such as the LAN or the cellular network discussed above.

Controller 68 includes operation control methods embodied in application code shown or described with reference to FIGS. 11-4 and FIG. 19. These methods are embodied in computer instructions written to be executed by processors 78, 104, typically in the form of software. The software can be encoded in any language, including, but not limited to, assembly language, VHDL (Verilog Hardware Description Language), VHSIC HDL (Very High Speed IC Hardware Description Language), Fortran (formula translation), C, C++, C#, Objective-C, Visual C++, Java, ALGOL (algorithmic language), BASIC (beginners all-purpose symbolic instruction code), visual BASIC, ActiveX, HTML (HyperText Markup Language), Python, Ruby and any combination or derivative of at least one of the foregoing.

Also coupled to the processor 104 are the sensors 108. The sensors 108 may include but are not limited to: a microphone 116; a speaker 118; a front or rear facing camera 120; accelerometers 122 (inclinometers), gyroscopes 124, a magnetometers or compass 126; a global positioning satellite (GPS) module 128; a barometer 130; a proximity sensor 132; and an ambient light sensor 134. By combining readings from a combination of sensors 108 with a fusion algorithm that may include a Kalman filter, relatively accurate position and orientation measurements can be obtained.

It should be appreciated that the sensors 60, 74 integrated into the scanner 30 may have different characteristics than the sensors 108 of mobile device 43. For example, the resolution of the cameras 60, 120 may be different, or the accelerometers 94, 122 may have different dynamic ranges, frequency response, sensitivity (mV/g) or temperature parameters (sensitivity or range). Similarly, the gyroscopes 96, 124 or compass/magnetometer may have different characteristics. It is anticipated that in some embodiments, one or more sensors 108 in the mobile device 43 may be of higher accuracy than the corresponding sensors 74 in the system 30. As described in more detail herein, in some embodiments the processor 78 determines the characteristics of each of the sensors 108 and compares them with the corresponding sensors in the system 30 when the mobile device. The processor 78 then selects which sensors 74, 108 are used during operation. In some embodiments, the mobile device 43 may have additional sensors (e.g. microphone 116, camera 120) that may be used to enhance operation compared to operation of the system 30 without the mobile device 43. In still further embodiments, the system 30 does not include the IMU 74 and the processor 78 uses the sensors 108 for tracking the position and orientation/pose of the system 30. In still further embodiments, the addition of the mobile device 43 allows the system 30 to utilize the camera 120 to perform three-dimensional (3D) measurements either directly (using an RGB-D camera) or using photogrammetry techniques to generate 3D maps. In an embodiment, the processor 78 uses the communications circuit (e.g. a cellular 4G internet connection) to transmit and receive data from remote computers or devices.

In the exemplary embodiment, the system 30 is a handheld portable device that is sized and weighted to be carried by a single person during operation. Therefore, the plane 136 (FIG. 18) in which the 2D scanner 50 projects a light beam may not be horizontal relative to the floor or may continuously change as the computer moves during the scanning process. Thus, the signals generated by the accelerometers 94, gyroscopes 96 and compass 98 (or the corresponding sensors 108) may be used to determine the pose (yaw, roll, tilt) of the system 30 and determine the orientation of the plane 51.

In an embodiment, it may be desired to maintain the pose of the system 30 (and thus the plane 136) within predetermined thresholds relative to the yaw, roll and pitch orientations of the system 30. In an embodiment, a haptic feedback device 77 is disposed within the housing 32, such as in the handle 36. The haptic feedback device 77 is a device that creates a force, vibration or motion that is felt or heard by the operator. The haptic feedback device 77 may be but is not limited to: an eccentric rotating mass vibration motor or a linear resonant actuator for example. The haptic feedback device is used to alert the operator that the orientation of the light beam from 2D scanner 50 is equal to or beyond a predetermined threshold. In operation, when the IMU 74 measures an angle (yaw, roll, pitch or a combination thereof), the controller 68 transmits a signal to a motor controller 138 that activates a vibration motor 140. Since the vibration originates in the handle 36, the operator will be notified of the deviation in the orientation of the system 30. The vibration continues until the system 30 is oriented within the predetermined threshold or the operator releases the actuator 38. In an embodiment, it is desired for the plane 136 to be within 10-15 degrees of horizontal (relative to the ground) about the yaw, roll and pitch axes.

In an embodiment, the 2D scanner 50 makes measurements as the system 30 is moved about an environment, such from a first position 142 to a second registration position 144 as shown in FIG. 11. In an embodiment, 2D scan data is collected and processed as the system 30 passes through a plurality of 2D measuring positions 146. At each measuring position 146, the 2D scanner 50 collects 2D coordinate data over an effective FOV 148. Using methods described in more detail below, the controller 68 uses 2D scan data from the plurality of 2D scans at positions 146 to determine a position and orientation of the system 30 as it is moved about the environment. In an embodiment, the common coordinate system is represented by 2D Cartesian coordinates x, y and by an angle of rotation θ relative to the x or y axis. In an embodiment, the x and y axes lie in the plane of the 2D scanner and may be further based on a direction of a “front” of the 2D scanner 50.

FIG. 12 shows the 2D system 30 collecting 2D scan data at selected positions 108 over an effective FOV 110. At different positions 146, the 2D scanner 50 captures a portion of the object 150 marked A, B, C, D, and E. FIG. 12 shows 2D scanner 50 moving in time relative to a fixed frame of reference of the object 150.

FIG. 13 includes the same information as FIG. 12 but shows it from the frame of reference of the system 30 rather than the frame of reference of the object 150. FIG. 13 illustrates that in the system 30 frame of reference, the position of features on the object change over time. Therefore, the distance traveled by the system 30 can be determined from the 2D scan data sent from the 2D scanner 50 to the controller 68.

As the 2D scanner 50 takes successive 2D readings and performs best-fit calculations, the controller 68 keeps track of the translation and rotation of the 2D scanner 50, which is the same as the translation and rotation of the system 30. In this way, the controller 68 is able to accurately determine the change in the values of x, y, θ as the system 30 moves from the first position 142 to the second position 144.

In an embodiment, the controller 68 is configured to determine a first translation value, a second translation value, along with first and second rotation values (yaw, roll, pitch) that, when applied to a combination of the first 2D scan data and second 2D scan data, results in transformed first 2D data that closely matches transformed second 2D data according to an objective mathematical criterion. In general, the translation and rotation may be applied to the first scan data, the second scan data, or to a combination of the two. For example, a translation applied to the first data set is equivalent to a negative of the translation applied to the second data set in the sense that both actions produce the same match in the transformed data sets. An example of an “objective mathematical criterion” is that of minimizing the sum of squared residual errors for those portions of the scan data determined to overlap. Another type of objective mathematical criterion may involve a matching of multiple features identified on the object. For example, such features might be the edge transitions 152, 154, and 156 shown in FIG. 11. The mathematical criterion may involve processing of the raw data provided by the 2D scanner 50 to the controller 68, or it may involve a first intermediate level of processing in which features are represented as a collection of line segments using methods that are known in the art, for example, methods based on the Iterative Closest Point (ICP). Such a method based on ICP is described in Censi, A., “An ICP variant using a point-to-line metric,” IEEE International Conference on Robotics and Automation (ICRA) 2008, which is incorporated by reference herein.

In an embodiment, assuming that the plane 136 of the light beam from 2D scanner 50 remains horizontal relative to the ground plane, the first translation value is dx, the second translation value is dy, and the first rotation value dθ. If the first scan data is collected with the 2D scanner 50 having translational and rotational coordinates (in a reference coordinate system) of (x₁, y₁, θ₁), then when the second 2D scan data is collected at a second location the coordinates are given by (x₂, y₂, θ₂)=(x₁+dx, y₁+dy, θ₁+dθ. In an embodiment, the controller 68 is further configured to determine a third translation value (for example, dz) and a second and third rotation values (for example, pitch and roll). The third translation value, second rotation value, and third rotation value may be determined based at least in part on readings from the IMU 74.

The 2D scanner 50 collects 2D scan data starting at the first position 142 and more 2D scan data at the second position 144. In some cases, these scans may suffice to determine the position and orientation of the system 30 at the second position 144 relative to the first position 142. In other cases, the two sets of 2D scan data are not sufficient to enable the controller 68 to accurately determine the first translation value, the second translation value, and the first rotation value. This problem may be avoided by collecting 2D scan data at intermediate scan positions 146. In an embodiment, the 2D scan data is collected and processed at regular intervals, for example, once per second. In this way, features in the environment are identified in successive 2D scans at positions 146. In an embodiment, when more than two 2D scans are obtained, the controller 68 may use the information from all the successive 2D scans in determining the translation and rotation values in moving from the first position 142 to the second position 144. In another embodiment, only the first and last scans in the final calculation, simply using the intermediate 2D scans to ensure proper correspondence of matching features. In most cases, accuracy of matching is improved by incorporating information from multiple successive 2D scans.

It should be appreciated that as the system 30 is moved beyond the second position 144, a two-dimensional image or map of the environment being scanned may be generated.

Referring now to FIG. 14, a method 160 is shown for generating a two-dimensional map with annotations. The method 160 starts in block 162 where the facility or area is scanned to acquire scan data 170, such as that shown in FIG. 15. The scanning is performed by carrying the system 30 through the area to be scanned. The system 30 measures distances from the system 30 to an object, such as a wall for example, and also a pose of the system 30 in an embodiment the user interacts with the system 30 via actuator 38. In the illustrated embodiments, the mobile device 43 provides a user interface that allows the operator to initiate the functions and control methods described herein. Using the registration process desired herein, the two-dimensional locations of the measured points on the scanned objects (e.g. walls, doors, windows, cubicles, file cabinets etc.) may be determined. It is noted that the initial scan data may include artifacts, such as data that extends through a window 172 or an open door 174 for example. Therefore, the scan data 170 may include additional information that is not desired in a 2D map or layout of the scanned area.

The method 120 then proceeds to block 164 where a 2D map 176 is generated of the scanned area as shown in FIG. 16. The generated 2D map 176 represents a scan of the area, such as in the form of a floor plan without the artifacts of the initial scan data. It should be appreciated that the 2D map 176 may be utilized directly by an architect, interior designer or construction contractor as it represents a dimensionally accurate representation of the scanned area. In the embodiment of FIG. 14, the method 160 then proceeds to block 166 where optional user-defined annotations are made to the 2D maps 176 to define an annotated 2D map that includes information, such as dimensions of features, the location of doors, the relative positions of objects (e.g. liquid oxygen tanks, entrances/exits or egresses or other notable features such as but not limited to the location of automated sprinkler systems, knox or key boxes, or fire department connection points (“FDC”). In some geographic regions, public safety services such as fire departments may keep records of building or facility layouts for use in case of an emergency as an aid to the public safety personnel in responding to an event. It should be appreciated that these annotations may be advantageous in alerting the public safety personnel to potential issues they may encounter when entering the facility, and also allow them to quickly locate egress locations.

Once the annotations of the 2D annotated map are completed, the method 160 then proceeds to block 168 where the 2D map is stored in memory, such as nonvolatile memory 86 for example. The 2D map may also be stored in a network accessible storage device or server so that it may be accessed by the desired personnel.

Referring now to FIG. 17 and FIG. 18 an embodiment is illustrated with the mobile device 43 coupled to the system 20. As described herein, the 2D scanner 50 emits a beam of light in the plane 136. The 2D scanner 50 has a field of view (FOV) that extends over an angle that is less than 360 degrees. In the exemplary embodiment, the FOV of the 2D scanner is about 270 degrees. In this embodiment, the mobile device 43 is coupled to the housing 32 adjacent the end where the 2D scanner 50 is arranged. The mobile device 43 includes a forward facing camera 120. The camera 120 is positioned adjacent a top side of the mobile device and has a predetermined field of view 180. In the illustrated embodiment, the holder 41 couples the mobile device 43 on an obtuse angle 182. This arrangement allows the mobile device 43 to acquire images of the floor and the area directly in front of the system 20 (e.g. the direction the operator is moving the system 20).

In embodiments where the camera 120 is a RGB-D type camera, three-dimensional coordinates of surfaces in the environment may be directly determined in a mobile device coordinate frame of reference. In an embodiment, the holder 41 allows for the mounting of the mobile device 43 in a stable position (e.g. no relative movement) relative to the 2D scanner 50. When the mobile device 43 is coupled to the housing 32, the processor 78 performs a calibration of the mobile device 43 allowing for a fusion of the data from sensors 108 with the sensors of system 20. As a result, the coordinates of the 2D scanner may be transformed into the mobile device coordinate frame of reference or the 3D coordinates acquired by camera 120 may be transformed into the 2D scanner coordinate frame of reference.

In an embodiment, the mobile device is calibrated to the 2D scanner 50 by assuming the position of the mobile device based on the geometry and position of the holder 41 relative to 2D scanner 50. In this embodiment, it is assumed that the holder that causes the mobile device to be positioned in the same manner. It should be appreciated that this type of calibration may not have a desired level of accuracy due to manufacturing tolerance variations and variations in the positioning of the mobile device 43 in the holder 41. In another embodiment, a calibration is performed each time a different mobile device 43 is used. In this embodiment, the user is guided (such as via the user interface 110) to direct the system 30 to scan a specific object, such as a door, that can be readily identified in the laser readings of the system 30 and in the camera-sensor 120 using an object recognition method.

Referring now to FIG. 19, a method 200 is provided for generating a 2D map of an environment. The method 200 begins in block 202 where the operator couples the mobile device 43 to the holder 41. In an embodiment, the coupling includes forming a communication connection between the processor 78 and the processor 104. This communication connection allows the processors 78, 104 to exchange data, including sensor data, therebetween. The method 200 then proceeds to block 204 where information regarding the sensors 108 is transmitted to the processor 78. The information transmitted includes the type of sensors (e.g. accelerometer) and performance characteristics or parameters of the sensor (e.g. dynamic range, frequency response, sensitivity (mV/g) temperature sensitivity, or temperature range).

The method 200 then proceeds to block 206 where the processor 78 compares the sensors 108 with the corresponding sensors in the system 20. In an embodiment, this comparison includes comparing performance characteristics or parameters and determining which sensor would provide a desired accuracy of the scan. It should be appreciated that this comparison is performed on a sensor by sensor basis. In some embodiments, the data used for tracking and pose may be a combination of the sensors from the mobile device 43 and the system 20. For example, the accelerometer 122 may be used in combination with the gyroscope 96 and compass 98 for determining tracking and pose.

In an embodiment, once the sensors are selected the method 200 a calibration step is performed in block 208. As discussed herein, the calibration step allows the transforming of data between the mobile device coordinate frame of reference and the 2D scanner coordinate frame of reference.

The method 200 then proceeds to block 210 where the scan is performed by moving the system 20 (with mobile device 43 attached) about the environment. As the scan is being performed (e.g. the 2D scanner is emitting and receiving reflected light and determining distances), the method 200 is transforming data in block 212 into a common frame of reference, such as the 2D scanner frame of reference for example, so that coordinates of the points of surfaces in the environment may be determined. As the scan is being performed, the position and pose of the system 20 is determined on a periodic, aperiodic or continuous basis as described herein.

Once the scan is completed, the method 200 proceeds to block 214 where the 2D map is generated of the scanned area. It should be appreciated that in embodiments where the camera 120 is a 3D camera or RGB-D type camera, a 3D map of the environment may be generated.

It should be appreciated that while embodiments herein describe the performance of operational control methods by the processor 78, this is for exemplary purposes and the claims should not be so limited. In other embodiments, the operation control methods may be performed by the processor 104 or a combination of the processor 78 and the processor 104.

Now referring to FIG. 20, an example of a 2D map of an environment is shown. The 2D map may be obtained by a scanning device such as the 2D scanner 50 described above. The 2D map provides a coarse representation of the scanned environment. The unrefined image can be caused by the limitations in the processing of the scan data. The scan data can correspond to the surface of one or more walls that are detected by the scanner. In other examples, the raw scan data can indicate the surface of an object or other obstacle such as a window, water fountain, etc. that is detected by the 2D scanner 50. FIG. 20 also depicts x-y coordinates that provide a frame of reference for the obtained scan data.

The outlined region 2010 shown in FIG. 20 is an example of a scanned area that will be further discussed in the description below. The lines that are detected by the 2D scanner device 50 are combined in a manner to represent a 2D map to produce the image of the scanned area. The image can be generated in real-time as the 2D scanner 50 is moved about the environment.

The techniques discussed herein provide a method to provide a refined map of the scanned environment in real-time. The techniques include using a 2D scanner 50 to perform an environment scan operation, a line identification and grouping operation, and an intersecting line operation to produce the map. It is to be understood that other processes and operations can be used generate the map in accordance with one or more embodiments.

The view displayed in FIGS. 21A-21D are referred to with reference to the example described in the outlined region 2010 of FIG. 20. FIG. 21A depicts a view of the image in which a plurality of lines (half-lines) corresponding to one or more walls is identified. FI G. 21B illustrates a plurality of lines that are detected by the 2D scanner 50. The 2D scanner 50 has identified lines 2110A and 2110B as shown in FIG. 21B, and the 2D scanner 50 has also identified lines 2120A, 2120B, and 2120C. After the scan data is obtained by the 2D scanner 50, characteristics of the segments and/or portions of the lines representing the object or wall are determined. In one or more embodiments, the characteristic of the lines is an angle of the identified lines that is measured against the reference frame of the image or 2D scanner 50. Another characteristic of the line can include lines that are in the same plane.

Each of the identified lines are grouped or assigned to categories or buckets based at least in part on the characteristic of the lines. This allows for lines and/or segments of lines that have the same orientation and are located in the same plane to be further analyzed according to the techniques described herein. FIG. 21C depicts a first group of lines (2110A and 2110B) that have the same orientation and are assigned to a bucket 2130. That is, lines 2110A and 2110B are positioned vertically (when viewed from the viewpoint of FIG. 21C) within the frame of reference and are in the same general plane. Therefore, these lines 2110A and 2110B are added to a first bucket 2130. FIG. 21D illustrates a second group of lines (2120A, 2120B, and 2120C) that are assigned to a different bucket 2140. Although in this example only two buckets/categories are shown, it should be understood that any number of buckets/categories including any number of lines can be used.

In the event the angle of the lines is used to perform the grouping, the lines that are within a configurable tolerance or angle threshold can be grouped together. For example, lines within a 2, 5, 10 degree, etc. range can be assigned to the same bucket. The angle threshold allows for scan data that identifies lines as substantially parallel to one another to be grouped in the same bucket. It should be understood the angle threshold is not intended to be limited by the examples discussed above.

After the lines are assigned to their respective buckets/categories, an average orientation of the lines that is to be assigned to each group can be calculated. The average orientation of all the lines in each bucket/category is then calculated and the result is used to label each bucket/category. The orientation of the lines corresponding to walls and/or other structures can be based on an angle between the lines and the frame of reference of the image or scanner.

Next, the current orientation of each line in each of the respective buckets/categories is updated. The orientation of each of the lines in each bucket is set to the calculated average orientation. In this manner, each of the lines in each bucket will have the same orientation and provide a refined image for display. The new orientation will be the average orientation calculated previously.

Subsequently, an evaluation of each of the lines in each respective bucket/category is performed to determine whether or not two or more of the identified lines should be merged into a larger line representing single object such as a wall. For example, the distance between lines 2120A and 2120B of bucket 2140 is determined, the distance between 2120A and 2120C is determined, and the distance between 2120B and 2120C is determined. The combinations of lines that are determined to be within a distance threshold are merged. A distance threshold can be configured to determine whether or not a first line is near another line. In some embodiments, the distance threshold can be a predefined threshold, or the threshold can be configured by an operator or administrator. The distance threshold is used to combine lines having a similar orientation (based on the angle to the reference frame) to provide a line that expands the scanned surface by the scanning device. In addition, the distance threshold avoids combining lines that may represent, for example, a narrow hallway. By combining lines that are within a certain distance threshold, a refined map can be produced for display. Lines 2120A and 2120C are not directly merged together because the distance between these pair of lines is outside the distance threshold. However, lines 2120A and 2120C are effectively merged together due to their association with line 2120B. As described above, the distance for each combination of lines is determined and compared with the distance threshold. The distance between lines that fall outside of the distance threshold can indicate another segment of a wall that is in the same plane that should not be combined because it may be separated by a hallway or other opening. It should be understood that other techniques to compare the combination of line segments can be used. When the lines are merged together, they provide the appearance of a single line as shown in FIGS. 22A and 22B.

After merging the lines, an optimization process is performed to identify lines that intersect one another. Referring now to FIG. 22A, the line 2210 represents a merged line for the bucket 2140 and the line 2220 represents a merged line for the bucket 2130 is shown. These intersecting lines are each associated with different buckets/categories. Responsive to identifying the intersecting lines, the shorter ends for each of the intersecting lines are removed. That is, shorter portions of the intersecting lines 2210A, 2220A exceeding the point of intersection of the lines will be removed. This technique provides the appearance of a cleaner and more accurate corner 2230 such as that shown in FIG. 22B. The intersection of lines 2210 and 2220 does not have overlapping edges as shown in FIG. 22A.

Now referring to FIG. 23, the final results can be displayed on an interface such as display device where the optimized 2D map is provided. The 2D map provides a cleaner, noise-free, and more geometric version of the map that has been applied to the detected map. The 2D map can be displayed on a variety of display devices. For example, the map can be displayed on the 2D scanner 50 or in another example, the map can be transmitted to a remote location for display on computing device having display capability. The techniques described herein are provided to manage the generation of large maps while providing real-time wall detection.

Now referring to FIG. 24, a flowchart of a method for performing real-time wall detection for indoor 2D mapping in accordance with one or more embodiments is shown. The method begins at block 2410 and proceeds to block 2420 where a 2D scanner 50 obtains scan data of an environment to generate a first map. Next, the method continues to block 2430, which provides for identifying lines from the scan data corresponding to a surface of a structure. In an embodiment, the lines are identified using a Canny edge detection process. Block 2440 provides for grouping the identified lines into categories/buckets based at least in part on a characteristic of the identified lines. The method at block 2450 provides for combining the identified lines in each category/bucket. In one or more embodiments, a processor calculates an average orientation of the identified lines in each category/bucket and changes the orientation of the identified lines in each category/bucket according to the calculated average orientation. Responsive to changing the orientation, a distance is determined between each of the identified lines in each category/bucket, and the identified lines are merged based at least in part on the determined distance. At block 2460, the method continues and provides for improving or optimizing the first map to generate a second map. The improvement or optimization process is discussed below with reference to the flowchart shown in FIG. 25. At block 2460 the second map is displayed. The method ends at block 2470 or the method can repeat one or more blocks provided in the method. In one or more embodiments of the invention, the 2D map is updated at a given rate or a configurable rate. In a non-limiting example, the 2D maps are updated at a rate of less than 1 second. The system and 2D scanner are configured to correctly detect the lines that correspond to the walls to produce the maps in real-time.

Now referring to FIG. 25, the optimization process continues at block 2510 from FIG. 24 and proceeds to block 2520 which provides for identifying intersecting lines of the identified lines from different categories/buckets. The intersecting lines can represent a structure such as a corner where two adjoining walls meet. The optimization process continues to block 2530 which provides for removing shorter ends of the intersecting lines. By removing the shorter ends of the intersecting lines, scan data that can add interference to the map can be removed. At block 2540, the method displays the updated map.

The technical effects and benefits provide a system and method to generate cleaner, noise-free maps in real-time by processing the scan data to identify lines, grouping and modifying the line orientation, and removing portions of scan data that adds interference in the map. In addition, the technical effects and benefits also include a technique to update the map as the current environment is being scanned.

The term “about” is intended to include the degree of error associated with measurement of the particular quantity based upon the equipment available at the time of filing the application.

The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. As used herein, the singular forms “a”, “an” and “the” are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms “comprises” and/or “comprising,” when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, element components, and/or groups thereof.

While the invention has been described in detail in connection with only a limited number of embodiments, it should be readily understood that the invention is not limited to such disclosed embodiments. Rather, the invention can be modified to incorporate any number of variations, alterations, substitutions or equivalent arrangements not heretofore described, but which are commensurate with the spirit and scope of the invention. Additionally, while various embodiments of the invention have been described, it is to be understood that aspects of the invention may include only some of the described embodiments. Accordingly, the invention is not to be seen as limited by the foregoing description but is only limited by the scope of the appended claims. 

What is claimed is:
 1. A system for performing real-time detection for mapping, the system comprising: one or more processors; a scanner; and a mobile computing device removably coupled to the scanner, the mobile computing device having a display; wherein the one or more processor are responsive to executable instructions which when executed by the one or more processors to: collect scan data of an environment to generate a first map; identify lines from the collected scan data corresponding to a surface of a structure; group the identified lines into categories based at least in part on a characteristic of the identified lines; combine the identified lines in each category; optimize the first map to generate a second map; and display the second map on the display.
 2. The system of claim 1, wherein combining the identified lines comprises the one or more processors are further responsive to executable instructions which when executed by the one or more processors to: calculate an average orientation of the identified lines in each category; change the orientation of the identified lines in each category according to the calculated average orientation; responsive to changing the orientation, determine a distance between each of the identified lines in each category; and merge the identified lines based at least in part on the determined distance.
 3. The system of claim 2, wherein the one or more processors are further responsive to executable instructions which when executed by the one or more processors to merge the identified lines based at least in part on a distance threshold.
 4. The system of claim 2, wherein the one or more processors are further responsive to executable instructions which when executed by the one or more processors to label the category based at least in part on the calculated average orientation of the identified lines in each category.
 5. The system of claim 3, wherein merging the identified lines is based on comparing the determined distance with a distance threshold.
 6. The system of claim 1, wherein optimizing the first map comprises the one or more processors are further responsive to executable instructions which when executed by the one or more processors to: identify intersecting lines of the identified lines from different categories; remove shorter ends of the intersecting lines; and display an updated map.
 7. The system of claim 1, wherein the one or more processors are further responsive to executable instructions which when executed by the one or more processors to generate an updated map as the environment is being scanned.
 8. The system of claim 1, wherein the characteristic is an orientation of the line.
 9. The system of claim 8, wherein the orientation is based at least in part on an angle of the identified lines and a frame of reference of the environment.
 10. The system of claim 1, wherein the one or more processors are further responsive to executable instructions which when executed by the one or more processors to further comprising performing the method in real-time.
 11. The system of claim 1, wherein the one or more processors are further responsive to executable instructions which when executed by the one or more processors to group the identified lines into the categories is based on an angle threshold.
 12. The system of claim 1, wherein the one or more processors are further responsive to executable instructions which when executed by the one or more processors to identify lines from the scan data based at least in part on performing a Canny edge detection.
 13. A method performing real-time detection for mapping, the method comprising: providing a scanner device configured to scan an environment to collect scan data to form a first map; identifying lines, by one or more processors, from the collected scan data corresponding to a surface of a structure; grouping the identified lines into categories based at least in part on a characteristic of the identifies lines; combining the identified lines in each category; optimizing the first map to generate a second map; and displaying, on a display device, the second map.
 14. The method of claim 13, further comprising calculating an average orientation of the identified lines in each category; changing the orientation of the identified lines in each category according to the calculated average orientation; responsive to changing the orientation, determining a distance between each of the identified lines in each category; and merging the identified lines based at least in part on comparing the determined distance to a distance threshold.
 15. The method of claim 14, wherein optimizing the first map comprises: identifying intersecting lines of the identified lines from different categories; removing shorter ends of the intersecting lines; and displaying an updated map.
 16. The method of claim 14, wherein the characteristic is an orientation of the identified lines that is based at least in part on an angle in reference to a reference frame of the environment.
 17. The method of claim 14, wherein identifying lines from the scan data is based at least in part on performing a Canny edge detection.
 18. A scanning device, comprising: one or more processors, wherein the one or more processor are responsive to executable instructions which when executed by the one or more processors to: collect scan data of an environment to generate a first map; identify lines from the collected scan data corresponding to a surface of a structure; group the identified lines into buckets based at least in part on a characteristic of the identified lines, wherein the characteristic is an orientation of the identified lines that is based at least in part on an angle in reference to a reference frame of the environment; combine the identified lines in each category; optimize the first map to generate a second map; and display the second map on the display.
 19. The scanning device of claim 18, wherein the one or more processors are configured to: calculate an average orientation of the identified lines in each category; change the orientation of the identified lines in each category according to the calculated average orientation; responsive to changing the orientation, determine a distance between each of the identified lines in each category; and merge the identified lines based at least in part on comparing the determined distance to a distance threshold.
 20. The scanning device of claim 18, wherein optimizing the first map comprises the one or more processors are configured to: identify intersecting lines of the identified lines from different categories; remove shorter ends of the intersecting lines; and display an updated map. 